package com.faryangsh.scheduleTask.ThreadPool;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

/**
 * Created by 杨志远 on 2017/6/6
 * email faryangsh@163.com.
 */
@Component
@Slf4j
public class AsyncTask {
//    protected final Logger logger = LoggerFactory.getLogger(this.getClass());
//
    @Async("myTaskAsyncPool")
    public void doTask1(int i) throws InterruptedException{
        log.info("Task"+i+" started.");
    }
}
